/**
 * @file    app_lumbar.h
 * @author  yhy
 * @brief   腰部系统应用层头文件
 * @version 1.00
 * @date    2025-07-30
 *
 * @copyright Copyright (c) 2025
 *
 */
#ifndef __APP_LUMBAR_H__
#define __APP_LUMBAR_H__

#include "app_airbag_system.h"

/**
 * @brief  Lumbar airbag index
 *
 */
typedef enum
{
    LUMBAR_AIRBAG_IDX_UP = 0U,
    LUMBAR_AIRBAG_IDX_DOWN,
    LUMBAR_AIRBAG_IDX_MAX,
} lumbar_airbag_idx_e;

/**
 * @brief  Lumbar airbag mode
 *
 */
typedef enum
{
    LUMBAR_MODE_FRONT    = 1U,
    LUMBAR_MODE_REAR     = 2U,
    LUMBAR_MODE_F_R_KEEP = 3U,
    LUMBAR_MODE_UP       = 4U,
    LUMBAR_MODE_DOWN     = 5U,
    LUMBAR_MODE_U_D_KEEP = 6U,
    LUMBAR_MODE_MAX,
} lumbar_mode_e;

result_e       app_lumbar_init(void);
result_e       app_lumbar_set_mode(lumbar_mode_e mode);
result_e       app_lumbar_stop(void);
void           app_lumbar_handle(void);
lumbar_mode_e  app_lumbar_get_mode(void);
airbag_state_e app_lumbar_get_airbag_state(lumbar_airbag_idx_e airbag_idx);
uint32_t       app_lumbar_get_air_pressure(lumbar_airbag_idx_e airbag_idx);

#endif
